/* $Id:edit_party.h jjs $ */
/*
   Copyright (C) 2007 by Jurjen Stellingwerff <jurjen@stwerff.xs4all.nl>
   Part of the Moros Project http://moros.sourceforge.net/

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License.
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY.

   See the COPYING file for more details.
*/

#ifndef EDIT_PARTY_H
#define EDIT_PARTY_H

#include <gtkmm.h>
#include <libglademm.h>
#include "list_games.h"
#include "../central/party.h"

/// Screen to edit game data

class edit_party : public Gtk::Window {
  public:
	edit_party(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> refGlade); ///< window
	virtual ~edit_party();   ///< remove window data
	void set_party(party *data, bool isnew, sigc::signal<void> ready);
	sigc::signal<void> signal_ready;
	party *party_data;
	///< Set the party data and result function when ready with it

  protected:
	Glib::RefPtr<Gnome::Glade::Xml> glade;
	Gtk::Entry* party_name;
	Gtk::TextView* party_descr;
	Glib::RefPtr<Gtk::TextBuffer> descr_buffer;
	Gtk::Button* party_cancel;
	virtual void clicked_cancel();
	Gtk::Button* party_delete;
	virtual void clicked_delete();
	Gtk::Button* party_ready;
	virtual void clicked_ready();
	Gtk::Label* party_create;
};

#endif //EDIT_PARTY_H
